<template>
  <div class="shareItem">
    <h3 class="title van-ellipsis" v-html="info.title"></h3>
    <div class="txt van-multi-ellipsis--l2">
      {{ info.content }}
    </div>
    <div class="other">
      <img
        v-if="info.author.avatar"
        :src="$baseUrl + info.author.avatar"
        alt=""
        class="imgIcon"
      />
      <img v-else src="@/assets/logo.png" alt="" class="imgIcon" />
      <div class="c1">{{ info.author.nickname }}</div>
      <div class="c2">{{ info.updated_at | formatTime }}</div>
      <div class="c3 iconfont">&#xe65b;</div>
      <div class="c4">{{ info.read }}</div>
      <div class="c3 iconfont">&#xe638;</div>
      <div class="c4">{{ info.star }}</div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['info']
}
</script>
<style lang="less" scoped>
.shareItem {
  padding: 10px 0;
  .title {
    font-size: 16px;
    font-family: PingFangSC, PingFangSC-Medium;
    font-weight: 500;
    text-align: left;
    color: #181a39;
    line-height: 22px;
    letter-spacing: 0px;
  }
  .txt {
    margin: 10px 0;
    font-size: 13px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: left;
    color: #545671;
    line-height: 18px;
    letter-spacing: 0px;
  }
  .other {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #ccc;
    .imgIcon {
      width: 22px;
      height: 22px;
      opacity: 1;
      border-radius: 50%;
      margin-right: 10px;
    }
    .c1 {
      flex: 1;
    }
    .c2,
    .c4 {
      margin-right: 10px;
    }
  }
}
</style>
